home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
XDOSMAN.ARJ
/
CHAPT6.DOC
< prev
next >
Wrap
Text File
|
1991-11-28
|
163KB
|
5,857 lines
Chapter 6.
X-DOS Command Reference
Introduction
This chapter contains a detailed explanation of the functions and
features of all the X-DOS internal and external commands. Though
X-DOS is command compatible with MS-DOS, many of the commands in
X-DOS have been considerably enhanced, supporting switches not
available in MS-DOS with many being accessed from user friendly
menus. For this reason, in order to get the most out of the
powerful features offered by X-DOS, we suggest you read the
detailed explanation of the commands you most frequently use in
order to better understand these additional features.
In the explanation of each command a number of headings appear
which are explained below:
Purpose: A brief description of the general function of the
command.
Type: The command type, (i.e. external, or internal to
COMMAND.COM or MAX.COM).
Syntax: The syntax (format) to be used when typing the
command at the command line.
Where: A description of the items listed under Syntax.
Remarks: Special features or points that should be noted when
using this command.
Examples: Examples of usages of the command.
6-1
The ADDPATH Command
Purpose: This command adds a temporary path to the end of the
current search path which is defined by the PATH
command.
Type: Internal to COMMAND.COM
Syntax: ADDPATH
[d:][path]directory;[d:][path]directory[;(...)]
Where: d:path - is the drive and path to the directory you
want to add to the current search path.
directory - is the name of the directory to add to
the current search path.
;(...) - shows that you can add several paths, each
separated with a semicolon.
Remarks: The ADDPATH command adds the path to one or more
directories at the end of the current search path.
This addition to the search path is only active until
you reboot your computer. To make permanent changes
to the search path you must use the PATH command in
your AUTOEXEC.BAT configuration file.
Examples: Suppose that you have a current search path like
this:
C:\DOS;C:\BUSINESS
If you have a directory C:\DOS\UTIL in which you
store your utilities files and you want to
temporarily add the UTIL path you could type:
ADDPATH C:\DOS\UTIL
Your current search path will now look like this:
C:\DOS;C:\BUSINESS;C:\DOS\UTIL
The C:\DOS\UTIL path will remain active until you
reboot your computer.
6-2
The ALIAS Command
Purpose: This command allows you to define aliases for
commands and redefine the function keys on your
keyboard.
Type: Internal to COMMAND.COM
Syntax: ALIAS [d:][path][filename]orALIAS
alias=commandorALIAS mPFn=command
Where: d:path - is the drive and path to the file which
holds your alias definitions.
filename - is the name of the file which holds your
permanent alias definitions.
alias= - is a temporary alias you want to define.
This alias definition is lost when you reboot your
computer.
command - is the command, including any parameters,
that you want to assign to a temporary alias or
function key definition.
~mPFn= - is the function key you temporarily want to
redefine. The tild (~) indicates a function key
translation. The 'm' is optional and must be
substituted with an A to specify the [Alt] key, a C
to specify the [Ctrl] key, or an S to specify the
[Shift] key. The 'n' must be substituted with the
number of the function key you are redefining, from 1
to 10.
Remarks: You cannot redefine the [F3] function key alone (it
is fixed as repeat the last command as in MS-DOS) but
it can be redefined in combination with the <>, , or
<> keys.
Also, the [F11] and F[12] function keys cannot be
redefined since most BIOSs do not return any code
when those keys are typed.
Examples: If you want to assign the command to run your
favourite Word Processor to the key combination
[Shift] [F2], you can type at the command line the
command :
ALIAS SPF2=WORDPROC.EXE
Note that if you want to use the function keys, the
statement FKEY=ON must appear in your CONFIG.SYS
6-3
file.
6-4
The APPEND Command
Purpose: This command allows your programs to locate non-
executable files such as overlay files, data files,
and configuration files in other directories than the
default directory.
Type: Internal to MAX.COM
Syntax: APPEND [d:][path][directory];[(...)]
Where: d:path - is the drive and path to the directory you
want to include in the search for non-executable
files.
directory - is the directory you want to include in the search
for non-executable files.
;(...) - shows that you can include several directories,
each separated by a semicolon.
Remarks: The PATH command searches only for files with the
.EXE, .COM and .BAT filename extensions. You can use
the APPEND command to extend the search path to non
executable files.
Examples: Suppose you have your favourite Word Processor in the
directory C:\WORDPROC and it uses the file
WORDPROC.INI in that directory, but you wish to
access WORDPROC.EXE from anywhere, you would type the
command :
APPEND C:\WORDPROC
6-5
The ATTRIB Command
Purpose: This command lets you display or modify the Archive,
System, Hidden, and Read-Only file attributes.
Type: Internal to MAX.COM
Syntax: ATTRIB [d:][path][filespec] [+A / -A] [+S / -S] [+H /
-H] [+R / -R]
Where: d:path - is the drive and path to the files you want
to display or change attributes on.
filespec - is the file or range of files to display
or change attributes on.
+ - turns the specified attribute ON.
- - turns the specified attribute OFF.
A - indicates the Archive file attribute.
S - indicates the System file attribute.
H - indicates the Hidden file attribute.
R - indicates the Read-Only file attribute.
Remarks: If ATTRIB is used with a file specification but no
attribute switches, ATTRIB shows all the attributes
for the spcified files.
The wildcards '?' and '*' can be used with the ATTRIB
command to modify more than one file.
Examples: Suppose you want to make the X-DOS.SYS file read-
write and non hidden, you would type the command :
ATTRIB -R-H X-DOS.SYS
6-6
The BACKUP (XBACK) Command
Purpose: Backup is the default alias that is assigned to the
XBACK program for compatibility reasons. Thus there
is no program on your X-DOS diskette called BACKUP,
the actual command name being XBACK. Please refer to
Chapter 10. for full details on using the BACKUP
(XBACK) program.
This command can make backups of data on your hard
disk onto diskettes to reduce the possibility of data
loss. You should make a backup of your hard disk data
on a regular basis. Files that are backed up with the
BACKUP command are stored in a special format and
must be restored again with the X-DOS RESTORE
command.
Syntax: XBACK [d1:] [d2:] [/switches] Running in manual mode
or
BACKUP d1:[path1][filespec] d2: [/switches] Running
in automatic backup mode
or
RESTORE d3: d4:[path2][filespec2] [/switches] Running
in automatic restore mode
Where: d1: - is the hard disk drive which contains the file
you want to backup.
d2: - is the floppy drive to which you want to backup
to.
path1 - is the path to the files you want to backup
on hard disk drive d1:.
filespec1 - is the range of files you want to backup.
d3: - is the floppy drive from which you want to
restore files.
d4: - is the hard disk drive onto which you want to
restore files.
path2 - is the path to the directory you want to
restore files to on the hard disk drive.
filespec2 - is the range of files you want to restore
from the backup set.
6-7
The BOOT Command
Purpose: This command reboots your computer.
Type: Internal to COMMAND.COM
Syntax: BOOT
Remarks: The BOOT command is a 'warm' boot and does not
completely reinitialize your computer. It is the
equivalent of typing [CTRL][ALT][DEL].
6-8
The BREAK Command
Purpose: This command changes or displays the [Ctrl] C and
[Ctrl] Break checking mode.
Type: Internal to COMMAND.COM
Syntax: BREAK [ON | OFF]
Where: ON - specifies that BREAK mode will be turned ON.
OFF - specifies that BREAK mode will be turned OFF.
Remarks: When this command is used with no parameters, the
current state of the BREAK will be displayed. When
you set the BREAK to ON, X-DOS will check for a
[CTRL] C or [CTRL][BREAK] every time it is called,
and will terminate the application if a break key has
been pressed. If the BREAK state is OFF, X-DOS checks
for the break key only when performing IO operations
to the keyboard, the screen and the COM and LPT
ports.
6-9
The CACHE Command
Purpose: This command can be used to enable or disable the
internal X-DOS cache once it is installed.
Type: Internal to COMMAND.COM
Syntax: CACHE [ON | OFF]
Where: ON - turns on the internal X-DOS cache when it has
previously been turned off with the CACHE OFF
command.
OFF - turns off the internal X-DOS cache, temporarily
disabling it.
Remarks: You may wish to disable the cache when running
special disk programs such as defragmenters. This can
easily be done by typing the CACHE=OFF command
directly from the command line avoiding the need to
edit the CONFIG.SYS file. After completing your disk
operations you can then re-enable the cache with the
CACHE=ON command.
6-10
The CD (CHDIR) Command
Purpose: This command changes the default directory to another
directory. You can change directory without entering
any path to the directory, and you can even use
wildcards in the directory specification.
Type: Internal to COMMAND.COM
Syntax: CD [d:][path][directory]
Where: d: - is the optional drive on which you want to
change default directory. You will still remain in
the default directory on the current drive.
path - is the optional path to the directory to which
you want to change.
directory - is the directory you want to change to.
You can use the '?' and '*' wildcards in the
directory specification.
Remarks: If you do not specify a path, CD will display a TREE
of the drive specified or the default drive if no
drive is specified.
You do not need to specify a full path to access a
subdirectory. If CD cannot find it as it is typed, it
will search for it in the whole drive.
You can specify wildcards such as '?' or '*' to
search for a subdirectory, CD will stop at the first
one that matches your specification.
Examples: Suppose you want to change to the directory UTIL,
which can be accessed as C:\DOS\TOOLS\UTIL in your
drive, you can type the command:
CD UTIL or CD UT*
from anywhere in the current drive. Note that if you
have two directories with the same name on your disk,
you should input the full path with the CD command.
Note that each time you use the CD command,
references to the directories you access are stored
in a special buffer, allowing you to use the POPD
command to recall any directory you have accessed.
6-11
The CDD Command
Purpose: This command changes both the default drive and
directory to another drive and directory. You can
change directory without entering any path to the
directory, and you can even use wildcards in the
directory specification.
Type: Internal to COMMAND.COM
Syntax: CDD [d:][path][directory]
Where: d: - is the optional drive on which the directory you
want to change to is located.
path - is the optional path to the directory to which
you want to change.
directory - is the directory you want to change to.
You can use the '?' and '*' wildcards in the
directory specification.
Remarks: See the CD command.
6-12
The CHGDATE Command
Purpose: This command allows you to change the time stamp and
date stamp of a file or range of files.
Type: Internal to MAX.COM
Syntax: CHGDATE [d:][path]filespec [/T HH:MM] [/D MM-DD-YY]
Where: d:path - is the drive and path to the file or range
of files you want to change time and/or date stamp
on.
filespec - is the file or range of files to change
time and/or date stamp on.
/T HH:MM - enters a new time stamp in the form HH:MM
where HH denotes hours in 24 hour format and MM
denotes minutes.
/D MM-DD-YY - enters a new date stamp in the form MM-
DD-YY where MM denotes the month, DD denotes the day,
and YY denotes the last two digits of the year.
Remarks: If you do not specify switches for date and time, the
current time and/or date will be used instead.
Examples: If you change the date and time of all the files with
a .COM extension in the DOS directory to a certain
date you would type the command:
CHGDATE C:\DOS\*.COM /T 12:00 /D 01-01-91
6-13
The CHKDSK Command
Purpose This command analyzes directories, files, and cluster
allocation on hard disks and diskettes. CHKDSK
provides information on disk usage and can optionally
check a disk for bad sectors, mark them as bad, and
try to save any data allocated to the cluster in
which the bad sector is located. CHKDSK can also
display repeated files on your disk.
Type: External Command
Syntax: CHKDSK [d:] [/F] [/R]
Where: d: - is the drive to analyze.
/F - makes CHKDSK attempt to correct any errors
encountered in the file allocation table and/or the
files on the analyzed drive.
/R - displays all repeated filenames on the drive you
are analyzing.
Remarks: The CHKDSK command allows you to analyze the
integrity of data structures on a drive. It checks to
make sure that the amount of disk space allocated to
each file matches the size recorded for it in its
directory, and that there are no portions of files
still allocated on the disk with no directory entries
for them. If you do not specify the /F switch when
executing CHKDSK, it displays any file and/or
directory errors but it will not correct the errors.
If you do not specify a drive for CHKDSK it
automatically checks the default drive. After
checking and possibly correcting any file and/or
directory errors, it displays a map of the disk usage
of the drive.
You can check the entire drive for bad sector by
pressing 'C' when the disk map is displayed. If you
do not wish to check for the sectors, press any other
key and CHKDSK will display statistics for the drive
you are analyzing.
6-14
The CLS Command
Purpose: This command clears the screen and returns the cursor
to the upper left hand corner of your screen.
Type: Internal to COMMAND.COM
Syntax: CLS
Remarks: Some application programs might reset your screen
color to a different color than the default. To reset
the colors, type the CLS command.
6-15
The COMMAND Command
Purpose: This command executes an additional copy of the
COMMAND.COM command processor.
Type: Internal to COMMAND.COM
Syntax: COMMAND [/P] [/C string] [/E:xxxx]
Where: /P - keeps the new copy of the command processor in
memory.
/C string - passes a command to the new copy of the
command processor and returns to the old command
processor.
/E:xxxx - sets the environment size for the new copy
of the command processor in bytes. It must be a value
between 160 and 9,999.
Remarks: You can use COMMAND /C to load a second batch file
from a first batch file and then return to the
original batch file when the second batch file exits.
You can also use COMMAND /C to pass parameters to
another batch files. With X-DOS, you can CALL other
batch files, essentially using them as subroutines.
This simplifies the use of calling other batch files
and does not necessitate the loading of an additional
command processor.
6-16
The COMP Command
Purpose This command compares the contents of two files or
two sets of files. It will display any differences in
both hexadecimal and ASCII formats.
Type: Internal to MAX.COM
Syntax: COMP [d:][path][filespec1] [d:][path][filespec2]
Where: d:path - is the drive and path to the files to
compare. The drive and path can be different for the
two files or set of files.
filespec1 - is the name of the first file to
compare. Use the '?' and '*' wildcards to compare two
sets of files.
filespec2 - is the name of the second file or set of
files to compare. You can also specify wildcards for
filespec2.
Remarks: The COMP command compares the contents of two files
or two sets of files byte by byte. You can compare
files that reside in the same directory, or the two
files or file sets can reside in different
directories and drives.
If you do not specify a filespec for the first set of
files to compare, COMP automatically assumes that you
want to compare all the files in the specified
directory (*.*). If you furthermore leave out a path
for the first set of files, you must, as a minimum,
specify which drive the first file set resides on and
COMP will then assume that the first set of files to
compare are all the files present in the default
directory of your specified drive.
Examples: If you want to compare the file TEST1.EXE with the
file TEST2.EXE in the default directory, you only
need to type:
COMP TEST1.EXE TEST2.EXE
6-17
The COPY Command
Purpose: This command copies files, creates text files, sends
binary files to a printer, and combines several files
into one. Even though not as powerful and fast as the
XCOPY command, COPY has features which are not
available in XCOPY.
Type: Internal to COMMAND.COM
Syntax: COPY [d:][path][filespec1] [d:][path]filespec2
(Normal Copying)
or
COPY CON [d:][path]filename (Creating a Text File)
or
COPY printfile port [/B] (Printing Files)
or
COPY file1+file2+(...) [dest-file] [/B] (Combining
Files)
Where: d:path - is the drive and path of the filespec to
copy (source) or the filespec to copy to
(destination). The drive and path specification for
source and destination do not have to be the same.
filespec1 - is the file or range of files to copy.
The filespec can include the wildcards '?' and '*'.
filespec2 - is the destination name(s) of the copied
files. The destination filespec can also include
wildcards.
CON - takes the input from the keyboard. Used to
create text files.
filename - is the name of the text file to create
with COPY CON.
printfile - is the name of the file to send to the
printer.
port - is any legal output device such as PRN,
LPT1,LPT2, LPT3, COM1, COM2, COM3, COM4 or AUX.
/B - copies a binary file to the printer by ignoring
any ^Z (end-of-file) characters in the file. The /B
6-18
switch also allows you to combine several binary
files into one binary file.
file1, file2 - are names of files to combine into one
file.
+ - is the combine symbol used by COPY.
(...) - shows that you can combine several files at a
time.
dest-file - is the optional name of the file into
which the contents of the source files is written. If
you do not specify a destination file, the contents
is written to file1, overwriting the previous
contents.
Remarks: If you need to copy a lot of files, you should rather
use the XCOPY command.
Examples: If you want to copy the file MYFILE.TXT to another
filename, MYFILE2, in the default directory you
should type:
COPY MYFILE.TXT MYFILE2.TXT
If you want to copy all files in the default
directory with the extension *.EXE to the root
directory of the B: drive, you should type:
COPY *.EXE B:\
You may find it useful to combine the contents of two
or more files into one file. To combine multiple
files into one file you must separate all source
files with a plus (+) sign. If the files you wish to
combine are binary files, you will have to specify
the /B switch so that COPY does not end the combining
of files after it encounters the first ^Z (end-of-
file) character.
To copy the contents of the three files FILE1.TXT,
FILE2.TXT, and FILE3.TXT to a file which you wish to
call NEWFILE.DOC, you should type:
COPY FILE1.TXT+FILE2.TXT+FILE3.TXT NEWFILE.DOC
6-19
The CTTY Command
Purpose: This command changes the way X-DOS handles the
standard input and output and can be used to select
other device drivers to input DOS commands.
Type: Internal to COMMAND.COM
Syntax: CTTY devicename
Where: devicename - is AUX, COM1, COM2, COM3 or COM4 to set
a new console; CON to restore control to the screen
and the keyboard; NULL to disable the keyboard and
screen.
Remarks: CTTY NULL is often used to turn the monitor and
keyboard off while certain processes are executing.
The NULL bucket is used to inhibit messages displayed
from certain commands.
The CURSOR Command
Purpose: This command turns the cursor ON or OFF which can be
useful in batch files. Also, some programs may exit
and leave you with the wrong type of cursor or no
cursor at all. The CURSOR command can restore your
cursor back to normal again.
Type: Internal to COMMAND.COM
Syntax: CURSOR [ON | OFF]
Where: ON - Turns ON the cursor.
OFF - turns OFF the cursor.
Remarks: The CURSOR command is handy when used in batch files.
If you run a batch file menu system you may not wish
to display the cursor on the screen. If you insert a
CURSOR OFF command in your batch file, it will turn
off the cursor. Remember to insert the CURSOR ON
command before exiting the user to the command line
or the cursor will remain turned off.
Examples: To turn off the cursor, type :
CURSOR OFF
6-20
The DATE Command
Purpose: This command displays the current date according to
the system clock and allows you to reset the date.
Type: Internal to COMMAND.COM
Syntax: DATE [MM-DD-YY]
Where: MM - is the number of the month (leading zeros are
optional).
DD - is the day of the month (leading zeros are
optional).
YY - are the last two digits of the year. You can
specify all four digits for the year if you wish.
Remarks: If you execute the DATE command without any
parameters it displays the current date according to
the system clock. If you want to reset the date you
must specify the current month, day, and year as
parameters. When setting the date, you should be
aware that the format of the DATE command is
dependent on the setting of the COUNTRY statement in
the CONFIG.SYS file.
Examples: You can display the current date by typing:
DATE
The date is displayed similar to this:
Current date is Wed 4-11-1990
If a COUNTRY statement is not defined or if it is set
to 001 (US standard) in your CONFIG.SYS file, you can
set the date to the 1st of February 1991 with the
DATE command by typing: DATE 02-01-91
The DEBUG Command
Purpose: This command provides you with a flexible environment
which is especially useful for testing, modifying,
viewing, and creating executable programs (.EXE and
.COM files) and binary files and manipulating or
modifying any disk data.
Type: External Command
Syntax: DEBUG [d:][path][filename [parameters]]
6-21
Where: d:path - is the drive and path to a file you want to
load into DEBUG.
filename - is the name of the file to load into
DEBUG.
parameters - are any parameters needed by the file
you are loading into DEBUG.
Remarks: Please refer to Chapter 11. in this manual for full
details on using the DEBUG program.
6-22
The DECODE Command
Purpose: This command decrypts the contents of a file or range
of files that have previously been encrypted with the
ENCODE command. A file can only be decrypted
correctly if you use the same password that was used
to encrypt the file.
Type: Internal to MAX.COM
Syntax: DECODE [d1:][path1]filespec1 [d2:][path2][filespec2]
Where: d1:path1 - is the drive and path to the file(s) you
want to decrypt.
filespec1 - is the name of the file(s) you want to
decrypt. You can use the '?' and '*' wildcards in the
file specification.
d2:path2 - is the drive and path to the destination
of the decrypted file(s).
filespec2 - is the optional name(s) you want to give
the file(s) after they have been decrypted.
Remarks When executing DECODE, you will be prompted for a
password. The password must be equal to or less than
20 characters and will be used in the decryption
algorithm. If you do not specify a name for the
decrypted file, DECODE automatically creates a file
called FILE.PWD with the decrypted information. There
is no limit to the size of the file you want to
encrypt.
Example We assume that you have a database file, TOPSEC,
which has been encrypted with the ENCODE command. You
now want to decrypt the TOPSEC file and you know that
the password used to encrypt the file is SECRET. To
decrypt the file TOPSEC with the password SECRET and
give the decrypted file the name PUBLIC.DBF, type:
DECODE TOPSEC PUBLIC.DBF
When DECODE prompts you for the password, type
SECRET. The contents of the file is decrypted and
copied to a file called PUBLIC.DBF. The original
encrypted file, SECRET, will still be present.
6-23
The DEL Command
Purpose: This command deletes a file or range of files which
you no longer need. Any files deleted with the DEL
command can easily be recovered with the UNDEL
command. If you want to ensure that the file(s) you
are deleting cannot be recovered, use the WIPEFILE
command to delete them.
Type: Internal to COMMAND.COM
Syntax: DEL [d:][path]filespec
Where: d:path - is the drive and path from which to delete
files.
filespec - is the file or range of files to delete.
You can use the '?' and '*' wildcards in the
filespec.
Remarks: DEL supports the wildcard characters `?' and `*'.
This allows for the deletion of groups of files when
required. Be very careful when you use wildcards to
delete multiple files since it is easy to
accidentally delete important files this way.
The DEL command will not delete files with the Read-
Only, System, and/or Hidden attributes set.
Examples: You can delete all files in the default directory by
typing:
DEL *.*
If you want to delete all files with the extension
.BAK in the root directory of your A: drive and you
are currently on the C: drive, you can type:
DEL A:\*.BAK
If you are in the root directory on the C: drive and
you want to delete all files with the first six
letters 1990DT in the C:\LASTYEAR directory, you
should type:
DEL \LASTYEAR\1990DT*.*
If you want to delete the full contents of a
directory, X-DOS will prompt you for confirmation
before proceeding.
Unlike the WIPEFILE command, DEL does not delete the
6-24
file entirely. Rather, the sectors used by the erased
files are simply made available for use by
subsequently written files. Until these sectors are
used, the files can be recovered using the X-DOS
UNDEL command. If you want to ensure that deleted
files cannot be recovered, use the WIPEFILE command.
6-25
The DIR Command
Purpose: This command displays a file or list of files in a
directory. Several available switches and different
colors for different file groups makes the DIR
command both very powerful and at the same time easy
to use. Preferred switch settings can be set as
default in the system environment with the SET
command.
Type: Internal to COMMAND.COM
Syntax: DIR [d:][path][filespec] [/switches]
Where: d:path - is the drive and path you want to display
files from.
filespec - is the range of files you want to display.
You can use the '?' and '*' wildcards in the
filespec.
Available Switches:
/A - displays files including their file
attributes.
/B - sorts the files by filesize before displaying
them.
/D - sorts the files according to the date and time
stamp before displaying them.
/F - sorts the files in alphabetic filename order
before displaying them.
/N - displays the files in directory order (no sort
performed).
/S - includes hidden files in the directory output.
Remarks: The DIR command has many switches which allow you to
tailor the output that you need. If you run the DIR
command with no specifications or switches you will
get a two-column display of the default directory's
files, sorted by filename extension. The output for
each file consists of the filename, the extension,
the size, and the time and date the file was last
written to disk.
To enhance the directory list, DIR will display files
in different colors, according to the filename
extension. Since different users may have different
favorite DIR outputs, it is possible to set your
preferred DIR output in the environment with the SET
DIR=/switches command. Alternatively you can set your
favorite DIR switches using the X-DOS INSTALL program
as detailed in chapters 4 and 5.
6-26
DIR will stop automatically at the end of each page.
So you do not need a /P switch (unlike the SDIR
command) to stop the display.
Examples: If you want to display all files with a .BAT file
extension in the BATCH directory on your C: drive,
you can type:
DIR C:\BATCH\*.BAT
If you wish the directory display to be the same as
the DOS standard, you can use the SDIR command or
type the EMULATE ON statement. Note that the X-DOS
DIR command also works with the redirection
character.
6-27
The DISKCOMP Command
Purpose: This command compares the contents of two diskettes
of equal density and displays detailed information
about any differences.
Type: External Command
Syntax: DISKCOMP d1: [d2:] [/1] [/8]
Where: d1: - is the floppy drive which holds the first
diskette to compare.
d2: - is the floppy drive which holds the second
diskette to compare. If you leave out d2:, DISKCOMP
automatically assumes d1: for both diskettes and you
will have to swap diskettes one or more times.
/1 - forces DISKCOMP to compare only the first side
of each diskette. This way you can compare the
contents of a 180K and 360K diskette.
/8 - forces DISKCOMP to compare only 8 sectors per
track of each diskette. This way you can compare the
contents of a 320K diskette with a 360K diskette. If
you include both the /1 and the /8 switches, you can
also compare the contents of a 160K and 360K
diskette.
Remarks: DISKCOMP will attempt to read the content of the
source diskette in conventional, XMS memorys,
expanded memory or hard disk if there is not enough
memory. Therefore, even for large capacity diskettes,
there is no need to change diskette. Note that
DISKCOMP can only accept diskettes of the same
density.
Examples: To compare the content of two 360K diskettes in the
same physical drive, type the command :
DISKCOMP A: A:
6-28
The DISKCOPY Command
Purpose: This command makes an image copy of a diskette onto
another diskette of the same density. The destination
diskette does not need to be formatted.
Type: External Command
Syntax: DISKCOMP d1: [d2:] [/1] [/8]
Where: d1: - is the floppy drive which holds the source
diskette to make an image copy from.
d2: - is the floppy drive that contains the
destination diskette which will hold the image copy.
If you leave out d2:, DISKCOPY automatically assumes
d1: for both diskettes and you will have to swap
diskettes one or more times.
/1 - forces DISKCOPY to make an image copy of only
the first side of each diskette. This way you can
make and image copy from a 360K diskette onto a 180K
diskette.
/8 - forces DISKCOPY to make an image copy of a 360K
diskette and only use the first 8 sectors per track.
This provides you with a way to make an image copy of
a 360K diskette onto a 320K diskette. If you include
both the /1 and the /8 switches, you can also make an
image copy of a 360K diskette onto a 160K diskette.
Remarks: DISKCOPY will attempt to read the contents of the
source diskette in conventional, XMS memory, expanded
memory or hard disk if there is not enough memory.
Therefore, even for large capacity diskettes, there
is no need to change diskettes.
If the target diskette is not formatted, DISKCOPY
will prompt you to format it.
Examples: To copy the contents of a 1.2 Mb diskette in the A:
drive to a blank 1.2 Mb diskette in the B: drive,
type the following command :
DISKCOPY A: B:
6-29
The ED Command
Purpose: Full-screen editor with advanced features to create,
display, and edit ASCII files. Use ED to create batch
files and other simple text files.
Type: External Command
Syntax: ED [d:][path][filename] [/W]
Where: d:path - is the drive and path to the file you want
to load into ED.
filename - is the name of the file you want to load
into ED.
/W - enables you to edit files in "Wordstar format".
Remarks: Please refer to Chapter 9. for a detailed explanation
of how to use ED.
6-30
The EMULATE Command
Purpose: This command allows you to substitute the STYPE and
SDIR commands (detailed later in this manual) for the
TYPE and DIR commands. The STYPE and SDIR commands
emulate the look of the MS-DOS TYPE and DIR commands.
This may be useful if you require a high degree of
compatibility with other disk operating systems.
Type: Internal to COMMAND.COM
Syntax: EMULATE ON | OFF
Where: ON - makes X-DOS emulate the TYPE and DIR similar to
the one available in MS-DOS.
OFF - turns OFF emulation and comes back to X-DOS DIR
and TYPE commands.
6-31
Remarks: The EMULATE command renames the STYPE and SDIR
commands to TYPE and DIR so that you can use these
commands the same way as their counterparts in MS-
DOS. With EMULATE ON when you do a DIR command, the
directory of files will appear on your screen exactly
as in MS-DOS. Some application programs may use these
commands through DOS gateways. Therefore, if you
experience problems running an application program,
you should try to run the EMULATE command before
running the application program, like this:
EMULATE ON
If the application command uses TYPE or DIR during
execution, it will use the STYPE and SDIR commands
instead of the more powerful TYPE and DIR commands,
which cannot be accessed again before EMULATE is set
to OFF.
To re-install the normal TYPE and DIR commands, you
should type:
EMULATE OFF
Note that for compatibility reasons, in batch files
EMULATE is set as ON.
6-32
The ENCODE Command
Purpose: This command encrypts the contents of a file,
rendering it unreadable to anyone who does not know
the chosen password. Encrypted files must be
decrypted with the DECODE command, using the same
password.
Type: Internal to MAX.COM
Syntax: ENCODE [d1:][path1]filespec1 [d2:][path2][filespec2]
Where: d1:path1 - is the drive and path to the file(s) you
want to encrypt.
filespec1 - is the name of the file(s) you want to
encrypt. You can use the '?' and '*' wildcards in the
file specification.
d2:path2 - is the drive and path to the destination
of the encrypted file(s).
filespec2 - is the optional name(s) you want to give
the file(s) after they have been encrypted.
Remarks: When executing ENCODE, you will be prompted for a
password. The password must be equal to or less than
20 characters long and will be used in the encryption
algorithm. If you do not specify a name for the
encrypted file, ENCODE automatically creates a file
called FILE.PWD with the encrypted information. There
is no limitation to the size of the file you want to
encrypt.
Examples: To encrypt the file SECRET.TXT you will run the
command
ENCODE SECRET.TXT SECRET.PWD
When ENCODE prompts you for the password, enter your
personal password and type [ENTER]. ENCODE will
generate the file SECRET.PWD. Note that the original
file is still available and you should delete this
file to ensure that no-one can read its contents.
Oh, and one more thing. Don't forget the password!
6-33
The EXIT Command
Purpose: This command terminates the current command
processor's session. It is mostly used when a local
copy of COMMAND.COM has been invoked from an
application program.
Type: Internal to COMMAND.COM
Syntax: EXIT
Remarks: The EXIT command is most frequently used when a local
copy of COMMAND.COM has been invoked from an
application program, when you issue a GATEWAY to the
DOS for instance.
Typing the EXIT command will return you to the
previous application, and remove the local copy of
the Command Processor from the memory.
6-34
The FDISK Command
Purpose: This command can help you low-level format and
partition hard disks.
It can also password protect hard disk partitions and
make them read-only.
Type: External Command
Syntax: FDISK
Remarks: FDISK is a menu-driven utility which allows you to
perform the following tasks:
* Low-level format MFM and RLL hard disks.
* Enter bad track information on your hard disk.
* Manage two hard disks.
* Set up eight partitions on two hard disks with
four partitions on each hard disk.
* Create partitions up to 512 megabytes in size.
* Make partitions Read-Only.
* Password protect partitions.
* Activate a partition.
* Delete any existing partitions.
* Display hard disk related data
FDISK is used to initialize and write partition data onto a new
hard disk, or a hard disk which you want to prepare again, before
the FORMAT command is used. Prior to creating any partitions on a
new hard disk you may have to low-level format it. Once the media
is low-level formatted, you can create one or more partitions,
and finally you can run the FORMAT command to prepare the
partition(s) for data. You may not need to low-level format a
hard disk more than once in the disk's lifetime unless you
experience problems with the disk.
FDISK can be used to manipulate existing partitions that you have
created with X-DOS. You can change the size of a partition,
create a new partition, or delete an old partition. Whenever you
create a partition or change the size of an existing partition,
you need to reformat the affected partition(s).
Make sure that you do not use FDISK to modify a partition that
contains valuable data, since the data will be lost. X-DOS allows
you to create and access partitions up to 512 megabytes in size.
X-DOS also lets you boot from partitions up to 512 megabytes.
Please be aware that if you use X-DOS's FDISK to create one or
more partitions larger than 32 megabytes, you may not be able to
access the partitions larger than 32 megabytes with other disk
operating systems.
6-35
One of the very powerful features of FDISK is its ability to make
one or more partitions Read-Only to prevent accidental deletion
or modification of data. Another feature is the ability to create
high security partitions with password protection. Without the
password(s) no-one will be able to access the partition(s) you
set up with password protection.
FDISK has on line help facility by pressing the F1 key.
How to use FDISK
When you run FDISK, it displays a screen with one menu and two
information windows. Before the main display of FDISK, you may
see a message saying that FDISK encountered an Error
Reading/Writing to your hard disk. If your hard disk has not been
previously formatted, you should disregard this message and press
any key to go to the main menu. The upper left window on the
screen is the FDISK main menu and all main options are available
from this menu. On the right of that screen, FDISK will show the
the current hard disk configuration of your system. In case you
have two hard disks, FDISK will first show the hardware
information of your primary hard disk.
The main menu gives you six options to choose from, as detailed
below.
Hard Disk Operation
In this menu, you can perform two tasks:
* Switch to another hard disk for installation if you have more
than one hard disk installed in your computer.
* Enter bad tracks, set the interleave, and low level format a
hard disk.
The low level format necessitates explanation since its operation
is risky and fairly technical. While you may want to change
partition sizes and partition information more than once, you
normally only need to low level format a hard disk once. If you
choose this option, FDISK will ask you if you want to input bad
tracks. Normally when you buy a new hard disk, it either has a
sticker attached to the drive or comes with a separate pice of
paper containing information about the bad tracks of the disk.
Allmost all hard disks contain bad tracks when they leave the
factory and to ensure that you do not write data to a bad track,
you have the possibility to enter the bad tracks menually. Bad
tracks are allways identified by a combination of Cylinder and
Head. FDISK expects you to enter both values in the bad track
window. When you are finished to enter all the bad tracks, type
[ESC] to return to the previous menu.
FDISK also expects you to enter the interleave factor of the
drive. FDISK prompts you with 5 choices of interleave factors.
The interleave factor defines how many rotation s of the disk it
takes to read a complete disk track. And interleave of 1 to 1
means that a complete track is read in one rotation while it
takes 3 rotations to read a complete track if the interleave
6-36
factor is set to 3 to 1. You should consult the menual of your
hard disk controller to find out which interleave to select. If
you cannot find any information about the recommended interleave
factor, you may choose factor 4 to 1 for older 8088 or 8086
computers, and factor 3 to 1 or 2 to 1 for faster computers.
Once you have specified the interleave factor, FDISK will prompt
you with a menu to continue the low level format operation or
aborting it. If you answer Yes, FDISK will warn you for the last
time about the consequences of proceeding with the low level
formatting. Read it carefully and if you are still sure that you
want to proceed with the low level formatting, then press a key.
If not, simply press [ESC] to return to the main menu.
Create Partition
Use this menu item to add partitions to the currently selected
hard disk. You can have up to 4 partitions on each hard disk when
installed with FDISK, altough X-DOS recognises up to 16
partitions installed with other partition tools like DiskManager
or Speedstor. If all the cylinders of the disk have already been
allocated, FDISK will display an error message. If you want to
change the size of a partition, you must first remove it by using
the Remove Partition function. Note here that removing a
partition will make it impossible to access again.
Active Partition
Use this menu to tell X-DOS which partition you should boot from.
This gives you the ability to have multiple operating systems on
your hard disk. You could for instance have X-DOS on one
partition, MS-DOS and UNIX on others. In order to boot with X-
DOS, unlike UNIX, you must specify here the boot partition. Also
make sure you choose a bootable partition on which you have the
X-DOS system or on which you plan to install X-DOS. As an advice,
choose the first partition as your boot partition.
Remove Partition
With this menu, you can remove any partition declaration in your
partition record. Please note that the X-DOS FDISK utility let
you remove partitions even if they are not DOS partition. You are
allowed to remove a UNIX partition if it exists. You must be very
carefull when using this option, since removing partition makes
it unrecoverable. If the partition you wish to remove has been
password protected, you must remove the password first.
Partition access
This is an interesting security feature of X-DOS and you should
read it carefully since it is not available on other DOS. With
this menu, you can assign safety precautions to any of your
partition wish are either X-DOS or normal DOS partitions. When
choosing this menu, a sub menu will appear and present you with 4
new options :
The Read-Write option is the default option for X-DOS partitions.
6-37
Is simply means that you can both red and write data from and to
the hard disk.
The Read-Only option prevents data from being written to the
disk. It is especially useful if you allow other people to access
data which does not change on a regular basis. You will of course
have to copy the information first to the partition, with the
Read-Write attribute set, before you change it to Read-Only.
The Add Password option let you specify a password up to eight
characters long for the password you have selected. If you choose
to put a password to any of your DOS partitions, you will be
prompted for a password at boot time for each of the protected
partitions. If you fail 3 times to input a correct password or
wait more than 20 seconds without typing anything, the system
will boot normally but you will not be able to access the drive
for which a password has been set. Attempting to access the drive
by changing drive at the DOS prompt will result in an the error
message : Drive Invalid. If you decide to protect a disk
partition, you should make sure not to forget the password.
The Remove Password option enables you to remove a previously
assigned password to a partition. For security reasons, you must
first retype the correct password before you can remove it.
Exit FDISK
When you have finished preparing your hard disk or changing any
partition information, choose the Exit option. FDISK will warn
you in some cases that it needs to reboot the system since some
modifications have been made to it.
6-38
The FIND Command
Purpose: This command searches for a specific text string in a
file or range of files and displays any occurrences
of the text pattern.
Type: Internal to MAX.COM
Syntax: FIND "string" [d:][path]filespec [/C] [/S]
Where: string - can be any combination of ASCII characters
up to 64 characters long.
d:path - is the drive and path of the filespec to
search through.
filespec - is the file or range of files which are
searched by FIND. You can include the '?' and '*'
wildcards in the file specification.
/C - makes FIND perform a non case sensitive search.
/S - makes FIND include sub-directories in the
search.
Remarks: FIND will search for any combination of ASCII
characters as defined in the string in all files that
match the filespec you enter. You must enclose the
ASCII string in quotation marks. The filespec can
contain the wildcards `*' and `?' to extend the
search to multiple files.
FIND will list the filename, the line number within
the file and the line of text which contains the
string for every matching string within the given
filespec. As a default the search is performed in the
default directory with case sensitivity. FIND has two
switches to extend its use, /C and /S.
The /C switch will force FIND to make the search non
case sensitive.
The /S switch will allow FIND to search for a
matching string in all files matching the filespec in
the default directory including all sub-directories
of that directory.
Example: If you want to find all occurrences of the word
"message" in a file named MAN.DOC you should type:
FIND "message" MAN.DOC
6-39
6-40
The FORMAT Command
Purpose: This command prepares a hard disk or diskette for use
by X-DOS. You have safe format and quick format modes
available besides the normal, destructive formatting.
Type: External Command
Syntax: FORMAT d: [/switches]
Where: d: - is the drive you want to prepare for use by X-
DOS.
Available Switches:
/1 or /180 - will only format side one of a
diskette.
/3 or /720 - will format a 720K diskette in a
higher density floppy drive.
/4 or /360 - will format a 360K diskette in a
higher density floppy drive.
/8 or /320 - will format a 360K diskette 8
sectors per track, giving it a
total capacity of 320K.
/1/8 or /160 - will format a 360K diskette to a
capacity of 160K.
/K - will perform a safe format of a
hard disk by saving only the FAT
table and directory table in a
temporarily safe place.
/Q - will perform a quick format which
only erases the FAT table and
directory table on the hard disk
or diskette.
/R - will attempt to recover all files
on a hard disk which has
previously been formatted with
the /K (safe format) switch
enabled.
Remarks: FORMAT is used to do the basic preparation of a
diskette or hard disk for use by the operating
system. It is the equivalent of drawing writing
guidelines on a blank sheet of paper, to make it
possible to write evenly across the paper.
Since disk operating systems rely so heavily on the
use of external media such as diskettes and hard
disks, it is required to have a FORMAT program that
addresses all of the configurations of diskettes and
hard disks utilized by computers that might run the
X-DOS operating system. X-DOS currently works with
6-41
160K, 180K, 320K, 360K, 720K, 1.2M, and 1.44M
diskettes, in both 5 1/4" and 3 1/2" configurations,
and any hard disk partitions up to 512 megabytes.
The X-DOS format command has a safety feature which
will allow you to save the data on the disk if the
appropriate switch is turned on. You can activate the
FORMAT with the /K switch. Or you can set the
FORMAT=/K in the environment. When formatting a hard
disk, this will save the FAT table and the root
directory for later recovery if needed.
Examples:
If you want to format a 360K diskette in a 1.2Mb
diskette drive, type the command :
FORMAT A: /4
6-42
The FORMFEED Command
Purpose: This command sends a formfeed command to a printer
connected to the PRN printer port.
Type: Internal to COMMAND.COM
Syntax: FORMFEED
Remarks: This command is very useful when used with some laser
printers, as they leave one page in the machine, if
the last page of a printout did not fill up with
text.
When you print on continuous paper on a dot matrix
printer and the last page of your printout does not
fill up with text, you can use FORMFEED to advance
the paper to the top of the next page.
Examples: If you want to eject the last page in your laser
printer, type the command :
FORMFEED
6-43
The INSTALL Command
Purpose: This command copies X-DOS onto a hard disk or set of
diskettes and helps you to set up a range of
configuration parameters. If you are setting up X-DOS
on top of another operating system, INSTALL ensures
that the destination drive will boot with X-DOS
without you having to reformat the drive.
Type: External to COMMAND.COM
Syntax: INSTALL [d:]
Where: d: - is the optional drive on which you want to
install X-DOS.
Please refer to Chapter 4., Installing X-DOS, for
more details.
6-44
The JOIN Command
Purpose: This command assigns a drive to a specific path on
another drive.
Type: Internal Command
Syntax: JOIN d1: d2:\directory
or
JOIN d1: /D
Where: d1: - is the drive letter to be joined to another
drive.
d2: - is the drive letter of the drive on which drive
d1: is joined.
path - is the path to the directory on drive d2:
which drive d1: is joined to.
directory - is the directory on drive d2: which drive
d1: is joined to.
/D - is a switch that disables the joining of drive
d1: and returns it to normal state.
Remarks Once a drive is joined it cannot be accessed unless
the JOIN d:/D is activated or the PC is rebooted.
If no parameters are given on the command line, JOIN
will display the currently joined drive.
You can specify one directory from the root to join a
drive. If the name of the directory already exists,
it becomes unavailable until JOIN is active.
6-45
The KEYB Command
Purpose: This command lets you install one of the 16 foreign
keyboard layouts.
Type: External Command
Syntax: KEYB xx
Where: xx =
BL to install the Belgian keyboard layout.
CA to install the Canadian/French keyboard
layout.
DK to install the Danish keyboard layout.
DU to install the Dutch keyboard layout.
FR to install the French keyboard layout.
GR to install the German keyboard layout.
IT to install the Italian keyboard layout.
LA to install the Latin American keyboard layout.
NW to install the Norwegian keyboard layout.
PO to install the Portuguese keyboard layout.
SP to install the Spanish keyboard layout.
SW to install the Swedish keyboard layout.
CH to install the Swiss keyboard layout.
UK to install the United Kingdom keyboard layout.
Remarks: KEYB re-assigns the layout of the keyboard for
various foreign keyboards.
KEYB should be included in your AUTOEXEC.BAT file if
you wish to use a keyboard layout other than the
United States default.
When KEYB has been activated from the command line,
you can always switch between the United States
keyboard layout with the [Ctrl][Alt][F1] hot key and
your chosen foreign keyboard layout with the
[Ctrl][Alt][F2] hot key.
As an added feature, you have instant access to a
symbols keyboard by pressing the [Ctrl][Alt][F3] hot
key. You can then use the keys on the keyboard to
type mathematical symbols and the numeric keypad for
line and box drawing. In the symbols mode you can
switch between two sets of symbolic characters
including single line and double line drawing
characters by holding the [Shift] key down.
[Ctrl][Alt][K] will call up a layout display of the
currently selected keyboard layout. Pressing the
6-46
[Shift] key will show the Upper-case key definitions,
pressing the [Alt] key will show the available keys
when pressing the [Alt] key at the command line and
pressing the [Shift] keys will show the available
keys when pressing the [Alt][Shift] keys at the
command line. Not all keyboard layouts support
definitions with the [Alt] key and the [Alt][Shift]
keys.
Examples: If you want to install the French keyboard driver on
your computer, you should type:
KEYB FR
6-47
The LABEL Command
Purpose: This command lets you assign a volume label to a
diskette or a partition on a hard disk to identify
the disk(ette).
Type: Internal to MAX.COM
Syntax: LABEL [d:][labelname]
Where: d: - is the drive you want to give a volume label.
labelname - is the volume label that will be assigned
to the drive.
Remarks: LABEL will overwrite any existing volume label that
has previously been assigned to the disk(ette).If no
drive is specified when running LABEL, the default
drive will automatically be assumed.
If labelname is not specified when running LABEL, you
will be prompted for a volume label.
A volume label can be no longer than 11 characters
long and can include spaces.
Examples: If you want to put the volume label "X-DOS 5-0" on
the default drive, type the command:
LABEL X-DOS 5-0
6-48
The LOADFIX Command
Purpose: This command ensures that a program is loaded above
the first 64K of conventional memory. It may be
necessary to use this command if the error message
"Packed file corrupted" appears if you are running X-
DOS in HMA.
Type: Internal to COMMAND.COM
Syntax: LOADFIX [d:][path]filename[program parameters]
Where: [d:][path]] - is the drive and path where the program
is located.
filename - is the name of the program it is wished to
run
[program paramters] - are any switches or parameters
used when running the program
Example: To ensure that a program named APPLICAT.EXE in the
MISC directory on the C: drive is loaded above 64K
you would type:
LOADFIX C:\MISC\APPLICAT.EXE
6-49
The LOCK Command
Purpose: This command prevents access to a partition on a hard
disk. This partition must have been programmed by the
FDISK utility to be password protected. You can
access a locked partition again with the UNLOCK
command.
Type: Internal to MAX.COM
Syntax: LOCK d:
Where: d: - is the drive letter for the hard disk partition
you wish to lock so that a password is required to
access it again.
Remarks: You cannot lock a partition on the default drive.
6-50
The MAPMEM (MEM) Command
Purpose: This command lets you display detailed information
about memory usage and available memory in your
computer. A list of memory resident programs is also
displayed.
Type: Internal to MAX.COM
Syntax: MAPMEM
Remarks: MAPMEM has many useful purposes but one of the most
valuable is its ability to tell you which programs
are currently resident in memory.
The MAPMEM display is split into two windows. The
upper window gives you information on the
conventional memory, DOS and data memory usage,
expanded memory, and extended memory in your computer
and tells you how much of each kind of memory is
still available for your use. The lower window
displays information on any programs currently
resident in memory as well as the interrupt vectors
hooked to these programs.
6-51
The MD (MKDIR) Command
Purpose: This command creates new sub-directories on your
diskettes and hard disk(s).
Type: Internal to COMMAND.COM
Syntax: MD [d:][path]directory
Where: d:path - is the drive and path where you want to
create a new sub-directory.
directory - is the name of the sub-directory you want
to create.
Remarks: The MD command is used to create new sub-directories.
You have to specify a name for the new sub-directory
which is different from any existing file or sub-
directory in the directory where you want to create
the new sub-directory. You cannot create a sub-
directory to a non-existing directory.
For example, MD cannot create the sub-directory
\FINANCE\REPORTS if the \FINANCE directory does not
already exist.
The root directory is automatically created when a
disk(ette) is formatted and must always be present on
a hard disk or diskette. You can create directories
in the root directory and you can create directories
in a directory of the root directory. Directories
below the root directory are called sub-directories.
Examples: If you want to create a sub-directory called NEWDIR
in the root directory on your default drive you
should type:
MD \NEWDIR
6-52
The MODE Command
Purpose: This command lets you control peripheral devices such
as parallel printers, serial printers, graphics
adapters, and keyboard speed from either the command
line or from a full-screen display. The full screen
display provides an easy menu driven environment for
executing the MODE functions. In the full screen mode
support for setting the cursor shape is also
provided. MODE also supports laptop displays from the
command line. The current settings of the MODE
command are stored in the file MODE.CFG for later
retrieval and editing.
Type: External Command
Syntax: MODE [parameters]
Remarks: When you type MODE with no parameters, you get a full
screen display command, from which all functions
available at the command line are available in a more
user friendly manner.
There are six different formats of the MODE command
from the command line.
Parallel Printer Mode - MODE LPT#[:] [CPL] [LPI]
LPT# Parallel printer port number #. # can have a value from 1 to
3.
CPL Characters Per Line. CPL can be set to either 80 or 132
characters per line.
LPI Lines Per Inch. LPI can be set to either 6 or 8 lines per
inch.
Redirect Parallel Printer - MODE LPT#=COM#
LPT# The parallel printer port to redirect. # can have a value
from 1 to 3.
COM# The serial communications port to redirect the parallel
printer output to. # can have a value from 1 to 4.
Communication Mode - MODE COM#[:]=bps[,parity] [,databit]
[.stopbits]
COM# Serial communications port number #. # can have a value from
1 to 4.
=bps Sets the transmission speed. Valid transmission speeds are :
6-53
110, 150, 300, 600, 1200, 2400 (default), 4800 or 9600.
,parity Sets the parity check. Valid entries are : N for No
parity (default), E for Even parity or O for Odd parity.
,databits Sets the number of bits per character.Valid entries are
7 or 8 (default) bits per character.
,stopbits Set the number of bits ending a character. Valid
entries are 1 or 2 (default) Stop bits.
Video Mode
Video Sets the video mode. Valid video modes from the command
line are : 40, 80, BW40, BW80, CO40, CO80, MONO, EGA or VGA.
Keyboard speed mode
MODE KBx
x is F for Fast keyboard response, M for medium, S for Slow.
Laptop Mode - MODE LAPTOP
LAPTOP translates color attributes into black and white which
makes them more easily visible on laptop displays.
From the command line, you can only specify one peripheral change
at a time. So if you want to change the parameters for both the
video display and one of the communication port, you will have to
issue the MODE command twice.
Examples: To set the parameters for the serial communications
port to COM1, 9600 bps, No parity, 7 databits, ans 1
stopbit; to redirect the output for the parallel
printer LPT1 to the serial port COM1; to set the
video adapter into the 43 line mode (EGA mode); to
set the keyboard response to Fast ┼ from the command
line, you should issue the following four commands :
MODE COM1:9600,N,7,1MODE LPT1=COM1MODE EGAMODE KBF
If you have configured your PC with the MODE command, you can
automatically retrieve all the MODE parameters by typing MODE
AUTO at the command line. The MODE settings you configure are
saved in a file called MODE.CFG. You should not delete this file,
and note that this file cannot be edited directly but only by
using the MODE command.
6-54
The MORE Command
Purpose: The MORE command can be used to display one screen of
output at a time. The MORE command reads input from a
pipe or redirected file and displays one screen of
information at a time.
Type: Internal to COMMAND.COM
Syntax 1: MORE[d:][path]filename
Syntax 2: command-name | MORE
Where: - is the redirection character
[d:] - is the drive on which the file is situated
[path] - is the directory in which the file is
situated
filename - is the name of the file it is wished to
display
command-name - is the name of the command to be
issued
| - is the pipe character
Remarks: A filename must be specified as the source if you use
the redirection character (). If you use the pipe (|)
you can use commands such as DIR, TYPE, SORT etc.
Note that you should set the TEMP environment
variable in your AUTOEXEC.BAT file before using a
pipe for redirection.
Examples: If you have a very long file called LONGFILE.TXT
which you wish to view on your monitor one screen at
a time you may use either of the following commands
to redirect the file through the MORE command to
display the file one screen at a time:
MORE LONGFILE.TXT
or
TYPE LONGFILE.TXT | MORE
The MORE command will display the first screen of text and prompt
you with the following message:
Press any key to continue
When you have finished viewing the contents of each screen, press
6-55
any key to view the next screen.
6-56
The NEWVER Command
Purpose: This command changes the DOS version that X-DOS
should emulate. As default X-DOS emulates a DOS
version of 3.3. Changing version number is only
necessary if you should need to run a program which
cannot run under DOS 3.3.
Type: Internal to COMMAND.COM
Syntax: NEWVER y.x
Where: y - is the major version number.
x - is the minor version number.
Remarks: The current version number of X-DOS is 5.0 but X-DOS
emulates a version number of 3.3. This means that
programs running under X-DOS will believe that X-DOS
has a version number of 3.3 instead of 5.0. The
reason for this is the fact that certain programs
expect to find a specific version number and will not
run if they do not find the expected operating system
version number.
Examples: If you want to change the internal version number of
X-DOS to 3.2 type :
NEWVER 3.2
This will cause the X-DOS VER command to display:
X-DOS Disk Operating System 5.0, emulating version number 3.20
6-57
The PATH Command
Purpose: This command lets you define a list of directories in
which X-DOS will look for executable files if it
cannot find the file you are trying to execute in the
default directory.
Type: Internal to COMMAND.COM
Syntax: PATH [d:][path][directory][;(...)]
Where: d:path - is the drive and path to the directory to
include in the search path.
directory - is the name of the directory to include
in the search path.
;(...) - shows that you can define multiple search
paths by separating the different search paths with a
semicolon.
Remarks: The PATH command allows you to tell X-DOS to search
through a list of sub-directories when it you are
trying to run an executable file which is not located
in the default directory. The list of directories
that you specify should include both drive and path
so that you can reach the directories from any drive.
When you have defined a search path with the PATH
command and run an executable file or batch file, X-
DOS will first search for it in the default
directory. If it cannot be found there, X-DOS looks
for the executable file or batch file in each
directory listed in the path search.
If you run the PATH command without any parameters,
PATH displays the currently defined search path.To
ensure that you do not need to enter a search path
every time you boot your computer, you should include
the PATH statement in your AUTOEXEC.BAT file. You
should always put the search paths to the directories
of your most used programs and batch files in the
front of the PATH statement since this will reduce
the seek time on your drive(s) for executable files
and batch files. X-DOS looks through the PATH list
from beginning to end until it encounters a matching
filename with an extension of .EXE, .COM, or .BAT.
Also remember to leave at least a path to the \DOS
directory for X-DOS to find utilities.
Examples: If you want X-DOS to search for executable programs
and batch files in the \DOS and \DOS\UTIL sub-
6-58
directories on your C: drive, you can set up the
proper search path by typing:
PATH C:\DOS;C:\DOS\UTIL
6-59
The POPD Command
Purpose: This command lets you quickly change to a directory
that you have previously been in. X-DOS continuously
keeps a list of the directories you change to with
the CD and CDD commands and the POPD command can
directly access any of them.
Type: Internal to COMMAND.COM
Syntax: POPD [nn] [*]
Where: nn - is the current number of the previous directory
you want to change to. If you run POPD without any
parameters it will change to the previous directory.
* - makes POPD display a list of the directories you
have previously been in. Each directory has an
assigned number which you can use to change to a
particular directory.
Remarks: X-DOS keeps a list of every directory, including
drive and path, you change to with the CD and CDD
commands. You can use this list of previous
directories to change directly to almost any previous
directory immediately with the POPD command. X-DOS
has allocated 196 bytes of memory to store previous
directories in and this amount of memory is enough to
hold 10 to 15 previous directories.
You can always display a list of the directories you
can change to with POPD by typing:
POPD *
If you execute the above command on your computer, your directory
list is going to reflect the directories you was previously in.
The first directory in your list, which has the number (01)
allocated to it, is the directory you was in just before changing
to the default directory. You can change to the previous
directory you was in one of two ways. You can type:
POPD 1
Alternatively, you can just type:
POPD
6-60
The PRINT Command
Purpose: This command prints ASCII text files to any standard
output device.The PRINT command is memory resident
and prints in the background while you can continue
working on something else.
Type: External Command
Syntax: PRINT [d:][path][filespec] [output] [switch]
Where: d:path - is the drive and path to the file or range
of files you want to print.
filespec - is the file or range of files to print.
You can use the '?' and '*' wildcards in the file
specification.
output - is the standard output device the file(s)
are sent to. It can be one of the following: PRN,
LPT1, LPT2, LPT3, COM1, COM2, COM3, COM4 or AUX.
Switches: /A - makes PRINT abort the current print job. If
there are other files in the print queue, the next
one will be processed. If you want to abort the
current print job and also clear all files in the
print queue, you have to clear the queue with the /E
switch before aborting the current print job.
/D - displays a list of the files in the print queue.
/E - removes any files from the print queue.
/I - toggles the extended character set ON or OFF.
Default setting is OFF which means that text graphics
characters are translated into printable ASCII
characters while all other the remaining extended
characters are discarded.
/T - puts a header followed by two blank lines on
every printed page. Furthermore, a formfeed is issued
at the end of every print job.
Remarks: PRINT is a memory resident program which facilitates
printing from the X-DOS environment. To print out a
range of files, use wildcard characters when
specifying the filespec for PRINT. A print queue is
automatically set up, containing all the files
currently being printed. As many as 25 files can
reside in the print queue at any time.
PRINT can send the output to any of the standard
6-61
output devices PRN, LPT1, LPT2, LPT3, COM1, COM2,
COM3, COM4 and AUX by specifying the output device
after the filespec. If no output device is specified,
PRINT uses the default setting of PRN.
Examples: If you want to print all files in the BUSINESS
directory with the first four letters "MAIL" and you
want to put a header on the top of each page and make
each file print on the top of a new page, you should
type:
PRINT \BUSINESS\MAIL*.* /T
6-62
The PROMPT Command
Purpose: This command allows you to customize the X-DOS
prompt.
Type: Internal to COMMAND.COM
Syntax: PROMPT [string]
Where: string - can be any valid prompt string consisting of
normal characters or metacharacters. Metacharacters
are defined below.
Metacharacters:
$1 - specifies white as the prompt color.
$2 - specifies black as the prompt color.
$3 - specifies light blue as the prompt color.
$4 - specifies cyan as the prompt color.
$5 - specifies green as the prompt color.
$6 - specifies light magenta as the prompt color.
$7 - specifies light red as the prompt color.
$8 - specifies light cyan as the prompt color.
$9 - specifies light green as the prompt color.
$$ - displays a dollar sign ($) as part of the prompt.
$_ - makes a Carriage-return/Linefeed as part of the prompt.
$B - displays a vertical bar (|) as part of the prompt.
$D - displays the current system date as part of the prompt.
$E - makes the Escape character (ASCII 27) part of the prompt.
$G - displays a greater-than sign (>>) as part of the prompt.
$H - makes a destructive backspace as part of the prompt.
$L - displays a less-than sign (<<) as part of the prompt.
$N - displays the default drive as part of the prompt.
$P - displays the default path as part of the prompt.
$Q - displays an equal sign (=) as part of the prompt.
$T - displays the current system time as part of the prompt.
$V - displays the version of X-DOS as part of the prompt.
Remarks: X-DOS allows you to change the command line prompt,
which is always displayed when X-DOS is ready to
accept a command from the command line.
By default, this prompt consists of the current drive
and path followed by a vertical bar and a line feed,
like this:
C:\DOS|_
If you execute the PROMPT command without any parameters, PROMPT
creates a prompt which is similar to the default prompt of other
disk operating systems for personal computers. This prompt only
consists of a drive letter followed by a greater-than (>>) sign.
6-63
The PROMPT command lets you change the default prompt in a
variety of ways. Above you have a list of available
metacharacters which have a special function with the PROMPT
command. A metacharacter must always be preceded by a dollar ($)
sign or PROMPT will interpret it as a normal character.You can
mix metacharacters and normal characters in any way, creating a
wide variety of interesting prompts. PROMPT does not distinguish
between upper and lower-case metacharacters.
If you have a color monitor, you can use the metacharacters $1 to
$9 to customize the colors of your prompt. You can include
several colors in the prompt. The default X-DOS prompt is
$7$P$B$_$8, and you can change this according to your taste.
Examples: If you want a more traditional PROMPT style, type the
command
PROMPT $P$G
6-64
The RD (RMDIR) Command
Purpose: This command allows you to remove directories from a
hard disk or diskette. You must ensure that a
directory you want to remove is empty before you can
remove it. You cannot remove the root directory.
Type:
Internal to COMMAND.COM
Syntax: RD [d:][path]directory
Where: d:path - is the drive and path to the directory you
want to remove.
directory - is the name of the directory you want to
remove.
Remarks: The directory you want to remove must be empty before
it can be removed. The "." and ".." entries which you
will normally see in any directory with the DIR and
SDIR commands are not file or directory entries. You
cannot delete them and they do not prevent the RD
command from deleting a directory.
You cannot remove directories that have hidden files
or directories in them, so if you have trouble
removing a directory, you should execute the DIR
command with the /S switch in the directory you want
to remove to see if any hidden files or directories
exist. If you specify a path to the sub-directory you
want to remove, the sub-directory at the end of the
specified path will be the sub-directory that will be
removed.
Examples: If you are currently in the root directory of the C:
drive and you want to remove the C:\OLDDIR directory,
you should type:
RD OLDDIR
The REN (RENAME) Command
Purpose: This command lets you to change the name of a file or
range of files.
Type: Internal to COMMAND.COM
Syntax: REN [d:][path]filespec1 filespec2
Where: d:path - is the drive and path that holds the file(s)
6-65
to be renamed.
filespec1 - is the file or range of files you want to
rename. You can use the '?' and '*' wildcards in the
file specification.
filespec2 - is the destination filespec of the
file(s) you are renaming.
Remarks: You cannot rename a file to a filename which already
exists as a file or directory in the directory where
you are renaming a file or group of files.
Examples: If you have a range of files in the default directory
with the extension .TXT which you want to give the
extension .DOC, you should type:
REN *.TXT *.DOC
6-66
The RENDIR Command
Purpose: This command lets you change the name of a directory.
Type: Internal to COMMAND.COM
Syntax: RENDIR [d:][path]oldname newname
Where: d:path - is the drive and path to the directory you
want to rename.
oldname - is the current name of the directory you
want to rename.
newname - is the name you want to give the directory.
Remarks: The directory you want to rename does not have to be
empty but you cannot rename the directory you are
currently in.You cannot give a directory a new name
which already exists as a filename or sub-directory
in the directory which contains the directory you
want to rename.
Examples: If you want to rename the BUDGET90 directory which is
a sub-directory of the C:\BUSINESS directory and give
it the name BUDGET91, you should type:
RENDIR C:\BUSINESS\BUDGET90 BUDGET91
6-67
The RESTORE Command
Purpose: Restores files which was previously backed up onto
diskettes from a hard disk with the BACKUP (XBACK)
command. RESTORE is an alias that runs the XBACK
command in automatic restoring mode.
Remarks: See Chapter 10. for full details on the BACKUP
(XBACK) command.
6-68
The RSETCAPS Command
Purpose: This command toggles the CapsLock light on your
keyboard and gets it back in synchronization with the
keyboard, should they for some reason get out of
synchronization.
Type: Internal to COMMAND.COM
Syntax: RSETCAPS
6-69
The RSETNUM Command
Purpose: This command toggles the NumLock light on your
keyboard and gets it back in synchronization with the
keyboard, should they for some reason get out of
synchronization.
Type: Internal to COMMAND.COM
Syntax: RSETNUM
6-70
The SDIR Command
Purpose: This command displays the contents of a directory.
The SDIR command is compatible with the DIR command
from other disk operating systems and has only been
implemented for compatibility reasons.
Type: Internal to COMMAND.COM
Syntax: SDIR [d:][path][filespec] [/P] [/W]
Where: d:path - is the drive and path to the file or range
of files you want to display.
filespec - is the file or range of files you want to
display. You can use the '?' and '*' wildcards in the
file specification.
/P - pauses the file display after each screen and
requires you to press a key to continue scrolling.
/W - displays the file list in a 4-column display
with only the filename shown.
Remarks: SDIR is the TTY counterpart to the much more powerful
X-DOS command DIR. SDIR is always resident in memory
just like the DIR command but SDIR does not perform
any kind of sorting of the files and directories and
it does not use colors.
To pause the output to the screen, you can press the
[Ctrl]-S keys or the [Pause] key if your keyboard has
one. Continue the scrolling by pressing any key.
Alternatively you can specify the /P switch to
automatically stop the scrolling after each screen of
filenames.
Since the features of SDIR are limited we suggest you
only use it in cases where you need absolute
compatibility with the DIR command from MS-DOS. The
SDIR command can be renamed as DIR either by an alias
or by having the emulate flag set to ON by typing
EMULATE ON at the command line.
Examples: If you want to display the contents of the default
directory, you should type:
SDIR
6-71
The SET Command
Purpose: Displays or writes information to the X-DOS
environment. Any information in the environment is
made available to all programs. Some of the X-DOS
commands takes advantage of the environment by
reading the user's preferred switch settings.
Type: Internal to COMMAND.COM
Syntax: SET [name=[parameter]]
Where: name= - is the name of a variable you want to set up
or clear from the environment.
parameter - is a list of any parameters assigned to
the name= variable.
Remarks: If you execute the SET command without any
parameters, SET displays the current environment
settings. You will see a range of variables of the
form:
Variable=value
and SET will also display the number of bytes used by
the environment and the amount of free environment
space.
Many software application packages use environment
instead of a disk file to hold configuration
information. Batch files may also use the environment
area to store temporary information.
SET also displays the number of bytes of your
environment and how much is left. Any aliases used
are also stored in the environment but can only be
displayed by typing the ALIAS command.
Examples: If you want to insert a variable, "TEMP=Testing", in
the environment you can do so by typing:
SET TEMP=Testing
If you later want to release the space used by this
declaration, type:
SET TEMP=
and the variable TEMP will be removed from the
environment.
6-72
The SETUP Command
Purpose: This command can be used to set the CMOS
configuration on 80286, 80386, and 80486 based
computers. If your computer has its own setup
program, you should use it instead of the X-DOS SETUP
command.
Type: External Command
Syntax: SETUP
Remarks: SETUP is totally menu driven and is therefore very
easy to use. You should only use SETUP when
reconfiguring your hardware or when you want to
correct the internal clock (the internal clock keeps
track of the current time and date). Your computer
will always tell you if the contents of your
computer's CMOS RAM is different from the actual
computer configuration (except for time and date).
During start-up you might be prompted with the
following type of error message:
CMOS configuration error. Press "F1" to RESUME.
When you encounter an error message like this, press
the "F1" key to boot your computer. Since SETUP is an
external command you must make sure that X-DOS can
find it.
A SETUP program has been included in X-DOS in case X-
DOS is stored in ROM, in which case the BIOS SETUP
program is normally removed because of limitations on
memory space.
6-73
The SHARE Command
Purpose: Installs file sharing and locking in a network
environment.
Type: Internal to COMMAND.COM
Syntax: [d:][path] SHARE [/F:space][/L:locks]
Where: d:path - specifies the drive and path containing the
SHARE command file if it is not in the current
directory of the default drive.
/F : - space allocates the file space (in bytes) for
the area X-DOS uses to record file sharing
information. Each file opened requires enough space
for the full filename (including extension) plus 11
bytes. The total space required is the sum of the
space used by all open files. The default value is
2048 bytes.
/L: - locks allocates the number of locks you want to
allow. The default value is 20 locks.
Remarks: The SHARE command is only used when operating in a
network environment and has no application on stand
alone systems. In a network, the SHARE command
governs the sharing of files by several users. In X-
DOS, the sharing mechanism is embedded in the kernel
and the SHARE.EXE file simply allocates the necessary
memory for the SHARE file table and the locks buffer.
Example:
SHARE
Loads file sharing with the default values for the /F
and /L switches.
6-74
The SORT Command
Purpose: The SORT command reads data from a file, sorts the
records, and writes the data to another file.
Type: Internal to MAX.COM
Syntax: SORT : [d:][path]filename1[d:][path]filename2
[/nn][/C][/R]
Where: d:path - is the drive and path to the file you want
to sort the contents of Filename1 does not have to
reside in the same directory as the directory of the
sorted file.
filename1 - is the name of the file you want to sort
the contents of.
filename2 - is the name of the file which will
contain the sorted output of filename1.
/nn - specifies the column at which the sorting is
performed.
/C - is used to turn case-sensitive sort ON.
/R - forces SORT to sort the data of filename1 in
reverse order.
Remarks: The sort order is in ascending ASCII character
sequence. You may supply the /R parameter to reverse
the sort order.
The /C option may be added to cause SORT to treat the
sort field as case sensitive data. That is, lower-
case letters are treated as different from their
upper-case counterparts.
You can sort the contents of a file at any column by
specifying the /nn parameter for the column position.
If /nn is omitted, the column sort begins from the
first column and for a length of 12 characters.
6-75
The STYPE Command
Purpose: This command displays the contents of a text file as
TTY output to the screen. The STYPE command is
compatible with the TYPE command from other disk
operating systems and has only been implemented for
compatibility reasons.
Type: Internal to COMMAND.COM
Syntax: STYPE [d:][path]filename
Where: d:path - is the drive and path to the file you want
to display the contents of.
filename - is the name of the file you want to
display the contents of.
Remarks: The STYPE command is the TTY counterpart to the much
more powerful X-DOS TYPE command. STYPE displays the
contents of any text file on your screen as a
continuous, scrolling display. You can temporarily
pause the screen output by pressing the [Ctrl]-S hot
key or the [Pause] key, if your keyboard has one.
Continue scrolling the contents of the text file by
pressing any key on your keyboard.
If you attempt to display the contents of a program
file or any other binary file you will see several
unusual characters on your screen and you will most
likely hear beep sounds from your computer's speaker.
If you wish to display the contents of such a file
you should use the X-DOS TYPE command.If X-DOS
encounters a TYPE command in a batch file, it
automatically uses the STYPE command instead of the
TYPE command for compatibility with MS-DOS. If you
wish to extend the compatibility to other cases than
batch files you can use the EMULATE command to
temporarily rename the STYPE command to TYPE. Since
the features of STYPE are limited, we suggest you
only use in cases where you need absolute
compatibility with the TYPE command from MS-DOS.
Examples: You have a text file, LETTER.DAT, in the default
directory. To display the contents of this file as
TTY output to the screen you should type:
STYPE LETTER.DAT
If you want to display the contents of the NEWS.TXT
text file in the \DOCUMENT directory of the B: drive,
you should type:
6-76
STYPE B:\DOCUMENT\NEWS.TXT
6-77
The SUBST Command
Purpose: Assigns a drive letter to another drive and/or
directory name for easy reference.
Type: Internal to COMMAND.COM
Syntax: SUBST [d1: d2:\path\directory]
or
SUBST d1: /D
Where: d1: - is the drive letter you want to substitute with
a path.
d2: - is the drive of the path you want substituted
with a drive letter.
path - is the path to the directory on drive d2:
which you want substituted with a drive letter.
directory - is the directory on drive d2: which you
want substituted with a drive letter.
/D - is a switch that disables the substituted drive.
Remarks: The SUBST command lets you set up drive letters to
reference sub-directories on other drives for easy
reference. If you execute the SUBST command without
any parameters, you will get a list of the
directories that are currently substituted and their
associated drive letters.
d2 must be a drive name that is not currently
allocated. However, space for it must have been
reserved by setting the last drive value in the
CONFIG.SYS file to a drive name higher or equal to
d2.
Examples: If you have a directory, C:\BUSINESS\LETTERS, which
you would like to be able to reference as drive D:,
type :
SUBST D: C:\BUSINESS\LETTERS
You can now use the D: drive letter instead of the
full directory name to access files in it.
6-78
The SYS Command
Purpose: This command transfers the X-DOS system files to any
formatted diskette or hard disk and makes it
bootable. The SYS command can transfer X-DOS onto any
formatted disk(ette) even if it already contains data
or another disk operating system.
Type: External Command
Syntax: SYS [d1:] d2:
Where: d1: - is the source drive from which SYS should read
the system files which are copied onto the
destination drive.
d2: - is the destination drive which will be made
bootable with the X-DOS system files.
Remarks: The SYS command copies the X-DOS system files onto a
hard disk or diskette so that X-DOS may be booted
from that disk(ette). SYS installs the boot record
and copies the X-DOS.SYS, COMMAND.COM, and MAX.COM
files onto the destination disk(ette).
Since the X-DOS system file X-DOS.SYS can reside
anywhere on a bootable disk(ette), X-DOS can be
installed on a hard disk or diskette that already
contains data and/or the system files from another
disk operating system.
The SYS command is so flexible that it prompts you if
you want to retain the old system files on a
disk(ette) if SYS finds the disk(ette) already
contains another disk operating system. If you choose
to keep the old system files, you can always re-
install the previous operating system again by the
using the SYS command from the operating system you
were using. In case you were using MS-DOS, you will
have to copy manually the COMMAND.COM file.Please be
aware that SYS will not install X-DOS on a computer,
it only makes a hard disk or diskette bootable. If
you want to install X-DOS onto a hard disk or
diskette, use the INSTALL program.
6-79
The TIME Command
Purpose: Displays or changes the system time of your computer.
If you change the system time, it is automatically
recorded in your computer's CMOS configuration, if
available.
Type: Internal to COMMAND.COM
Syntax: TIME [HH:MM:SS]
Where: HH - is the hour in 24 hour format (leading zeros
required).
MM - are the minutes (leading zeros required).
SS - are the seconds (leading zeros required).
Remarks: The TIME command has two uses. If you execute the
TIME command without any parameters it displays the
current time according to the system time. To reset
the time you must, as a minimum, specify the hour as
a parameter but you will normally specify the hour
and the minutes. Seconds may be entered as parameters
too. For computers based on the 80286, 80386, or i486
CPUs the TIME command can be used to reset the time
stored in the CMOS configuration area.
Examples: You can specify the current time by typing: TIME. The
time is displayed similar to this:
Current time is 10:31:26.50
If you want to reset the time to 8:34 a.m., just
type:
TIME 8:34
6-80
The TREE Command
Purpose: Displays a tree-structured outline of the directories
on a diskette or hard disk partition.
Type: Internal to COMMAND.COM
Syntax: TREE [d:]
Where: d: - is the drive on which you want to display the
directory structure.
Remarks: The TREE command displays a good representation of
the relationship between the different directories on
your disk(ette). If the list of directories cannot be
displayed on one full screen, you can use the [Ctrl]-
S hot key or the [Pause] key, if your keyboard has
one, to temporarily stop the scrolling of
directories. To continue the scrolling press any key
such as the [Enter] key.
Examples: If you wish to display the directories on your C:
drive you should type.
TREE C:
6-81
The TYPE Command
Purpose: This command can display the contents of any text
file or binary file and it lets you scroll in the
displayed file.
Type: Internal to COMMAND.COM
Syntax: TYPE [d:][path]filename [/W]
Where: d:path - is the drive and path to the file you want
to display the contents of.
filename - is the name of the file you want to
display the contents of.
/W - allows you to display files in "Wordstar
format".
Remarks: Unlike the STYPE command, TYPE allows you to move
around in the displayed file. The following keys are
used to move around in the displayed file:
Key Assignments
* Up arrow moves the display up one line in the displayed file.
* Down arrow moves the display down one line in the displayed
file.
* Right arrow moves the display seven characters to the right.
* Left arrow moves the display to the leftmost column of the
displayed file. The [Left] arrow key only has a function when
you have previously moved the display to the right with the
[Right] arrow key.
* Home moves to the beginning of the displayed file and displays
the first screen of file contents.
* End moves to the end of the displayed file and displays the
last screen of file contents.
* PgUp displays the previous screen of file contents.
* PgDn displays the next screen of file contents.
* Esc exits the TYPE command
Note that if TYPE is used with a redirector to a peripheral (such
as PRN), the TYPE command will perform an STYPE command instead
and will write the contents to the output file.
Examples: If you want to display the contents of the CONFIG.SYS
file on your C: drive, type the command :
TYPE C:\CONFIG.SYS
6-82
The UNDEL Command
Purpose: This command recovers files that have been
accidentally deleted. To ensure a safe file recovery,
you must undelete a file as soon as possible after it
has been deleted or we cannot guarantee recovery. You
cannot recover files that have been deleted with the
WIPEFILE command.
Type: Internal to MAX.COM
Syntax: UNDEL [filespec]
Where: filespec - is the file or range of files you want to
undelete. You can use the '?' and '*' wildcards in
the file specification.
Remarks: If you delete a file or range of files, you can use
the UNDEL command to undelete the files again. You
will have to be in the same directory as the deleted
files was previously in since UNDEL only looks in the
default directory for files to undelete. If you used
the WIPEFILE command to delete the file(s) with, you
will be able to undelete the files but the file
contents is totally destroyed.
It is important that you undelete the file(s) before
you write data to the disk. Otherwise your deleted
file(s) might be overwritten by the new data.
The UNDEL command works in two ways:
1. You can undelete a specific file or range of files by
specifying a filespec as a parameter with the UNDEL command.
In this case UNDEL looks in the default directory and tries to
see if it can match any deleted files with the specified
filespec.
2. You can run UNDEL without any parameters in which case UNDEL
will let you undelete all files in the default directory that
can be undeleted. UNDEL will display each file that can be
recovered one after another. You will have to confirm that you
want to undelete each file and you must also type in the first
character of the filename for each file that you want to
undelete. The character that you specify does not have to be
the same as the first letter of the filename before the file
was deleted.
Examples: We assume that you just deleted a range of files and
suddenly realized that one of the deleted files,
IMPORTNT.DOC, contained important information which
you certainly did not intend to delete. You should
immediately use the UNDEL command to recover the file
before writing any data to the disk(ette). To
6-83
undelete the IMPORTNT.DOC file change to the
directory in which it was located and type:
UNDEL *.DOC
UNDEL will display the information relative to a file
?MPORTNT.DOC You will need to specify the first
letter I to UNDEL then confirm the undelete of that
file before leaving the UNDEL command.
6-84
The UNLOCK Command
Purpose: This command lets you access a partition that has
been password protected. Password protection can be
programmed using the FDISK utility. You will need to
use UNLOCK if you booted your computer without
specifying the password for the partition you want to
access or if you locked the partition with the LOCK
command.
Type: Internal to MAX.COM
Syntax: UNLOCK d: [password]
Where: d: - is the drive letter for the hard disk partition
you want to unlock so you can access it again.
password - is the password required to gain access to
the locked partition. If you do not specify the
password, you will be prompted for it and the
password will not be echoed.
Examples: If you wish to unlock the D: drive and wish the
password not be displayed, type:
UNLOCK D:
6-85
The VER Command
Purpose: This command displays the X-DOS version number and
the version number that X-DOS currently emulates.
Type: Internal to COMMAND.COM
Syntax: VER
Remarks: X-DOS refers to the single digit to the left of the
period as the major version number and the pair of
digits to the right of the period as the minor
version number. Some programs check for the version
number before executing and will not execute with
certain version numbers. You can change the version
number that X-DOS thinks it is by using the NEWVER
command.
The current version number of X-DOS is version 5.0
and X-DOS emulates a version number 3.3 as default.
6-86
The VERIFY Command
Purpose: This command turns verification of disk writes ON or
OFF. When VERIFY is ON, X-DOS checks to see if data
written to the disk can be read again without errors.
Type: Internal to COMMAND.COM
Syntax: VERIFY [ON | OFF]
Where: ON - turns verification of disk writes ON.
OFF - turns verification of disk writes OFF.
Remarks: When VERIFY is set to on it ensures that data is
written to a disk(ette) without errors. If data is
not successfully written to the disk an error message
is displayed. As default VERIFY is turned off.
6-87
The VIRUSCHK Command
Purpose: This command allows you to protect your files against
a hostile virus program. A computer virus often
attaches itself to existing, executable files on your
hard disk and diskettes and may at some point destroy
the integrity of your data.
Type: External Command
Syntax: VIRUSCHK [d:][path][filename] [/switch]
Where: d:path - is the drive and path to the file you want
to include in, or delete from, the list of files that
are checked for a possible virus.
filename - is the name of the file to include in, or
delete from, the list of files that are checked for a
possible virus.
Switches: /A - adds a file to the virus checking list.
/D - deletes a file from the virus checking list.
/L - displays a list of the files that are currently
monitored by VIRUSCHK for a possible virus.
Remarks: A computer related virus is a program which is
written specifically for the purpose of destroying
the integrity of files on a disk. Viruses often
attach themselves to an existing file so that the
user is not likely to discover the infection of the
computer system until it is too late.
The VIRUSCHK command checks the time and date stamp,
the file size, and performs a CRC check on the files
that are monitored. You can include any files you
wish to protect against an infection in the monitored
file list. Keep in mind, however, that the virus
checker in X-DOS only warns you if it discovers
changes in the monitored files. It cannot eliminate a
virus from a disk, it only detects the presence of a
possible virus in the monitored files.
If VIRUSCHK encounters changes in any of the files
that it is monitoring when you run it, you will get a
warning message similar to this:
Possible virus on file:d:\path\filename.ext
followed by one of the following error
specifications:
File not found
6-88
VIRUSCHK cannot find the file on the disk in the
directory you specified when you added the file to
the checking list. If you have deleted or removed the
file on purpose, you should also delete it from the
virus checklist.
Otherwise you will get the same error message every
time you run VIRUSCHK.
Date & time of file has changed
The date and time stamp on the file, which indicates
the last date the file has been modified, has
changed.
Length of file has changed
VIRUSCHK has detected that the length of the file has
changed. Do not run programs which you know have
changed size.
CRC calculation on file different
VIRUSCHK performs a CRC checksum test on each
monitored file. If this checksum changes, you will
get this error message.
Note that you cannot have the VIRUSHCK command check
its own binary file.
You can add up to 256 files to be monitored by
VIRUSCHK which should be enough for most users. You
will probably only want to include the files that are
very common to personal computers like external X-DOS
commands.
Examples: If you want the FDISK.EXE file, which we assume is
located in the C:\DOS directory, to be monitored for
a possible virus by VIRUSCHK, you should type the
following command at the command line:
VIRUSCHK C:\DOS\FDISK.EXE /A
6-89
The VOL Command
Purpose: This command displays the volume label of a diskette
or hard disk partition.
Type: Internal to COMMAND.COM
Syntax: VOL [d:]
Where: d: - is the drive you want to display the volume
label of.
Remarks: The FORMAT /V or LABEL programs can be used to
install a volume label on a diskette or partition of
a hard disk. This volume label can then be used to
distinguish different hard disk partitions and
diskettes. You can always display the volume label of
a hard disk or diskette with the VOL command. The DIR
and XSHELL commands also displays the volume label.
Examples: We assume that your default drive is the C: drive and
you want to display the volume label of the diskette
in the A: drive. You can do this by typing:
VOL A:
6-90
The WHEREIS Command
Purpose: This command searches through all directories on a
drive for a file or range of files.
Type: Internal to MAX.COM
Syntax: WHEREIS [d:][filespec]
Where: d: - is the drive on which you want to search for
files.
filespec - is the file or range of files you want to
search for. You can include the '?' and '*' wildcards
in the file specification.
Remarks: The WHEREIS command is very useful in situations
where you are looking for one or more specific files
and you cannot remember where they are located.
As long as you can remember the filename or part of
the filename for the file(s) you want to locate, the
WHEREIS command can find the file(s) for you in no
time at all. When you execute WHEREIS it will display
the drive and directory of each file it finds that
matches the filespec.
It displays the size and time and date stamps along
with each matching filename.
Examples: If you want to display all files which matches the
filespec *.DOC on your default drive you should type:
WHEREIS *.DOC
6-91
The WIPEFILE Command
Purpose: This command deletes a file or range of files so they
cannot be recovered again. You should only use this
command to delete files that you are certain that you
will not have any further use of and which you want
to ensure cannot be recovered by anybody else.
Type: Internal to COMMAND.COM
Syntax: WIPEFILE [d:][path]filespec
Where: d:path - is the drive and path which holds the file
or range of files you want to delete and make
unrecoverable.
filespec - is the file or range of files you want to
delete. You can use the '?' and '*' wildcards in the
file specification.
Remarks: WIPEFILE overwrites the area on the disk which is
allocated to the file(s) you are deleting so that
these file(s) will not be recoverable again.
This provides you with a way of ensuring that nobody
will be able to recover your "sensitive" data when
you delete it.
Files deleted with the DEL command can easily be
recovered which provides you with a safety net in
case you accidentally delete files. Therefore, you
should only use the WIPEFILE command to delete files
which are NOT intended to be recovered again.
Examples: If you want to delete all files in the default
directory and make sure that nobody will be able to
undelete them again you can do so by typing:
WIPEFILE *.*
6-92
The XCOPY Command
Purpose: This command will copy or move any files and
directories, including sub-directories, to another
drive and/or directory. Several switches give you a
variety of options concerning which files/directories
should be copied and the way they are copied.
Type: External Command
Syntax: XCOPY [d1:][path1]filespec1 [d2:][path2][filespec2]
[/switches]
or
XCOPY [d1:][path1]filespec1 device [/switches]
Where: d1:path1 - is the drive and path to the source files
your are copying.
filespec1 - is the file or range of files you are
copying. You can use the '?' and '*' wildcards in the
file specification.
d2:path2 - is the drive and path to the destination
of the copied files.
filespec2 - is the name you want to give the copied
files. You can use the '?' and '*' wildcards in the
file specification.
device - is the name of the standard output device to
copy files to. You can specify PRN, LPT1, LPT2, LPT3,
COM1, COM2, COM3, COM4 or AUX.
Switches: /A - copies only files with the Archive attribute
set.
/C - lets you pick files to copy from a list of
displayed files.
/D - date - copies files modified on or after the
specified date. The date must be entered in the same
format as when you change the date with the DATE
command.
/E - includes all sub-directories to the directory
which contains the source files that are being
copied. Empty sub-directories are also copied.
/I - includes any hidden files matching filespec1.
/M - copies files with the Archive attribute set and
resets it after the files are copied. Used for
6-93
backing up files.
/N - copies only files that are new to the
destination directory.
/P - prompts for each file before copying it.
/Q - asks for confirmation before copying if a file
already exists in the destination directory.
/R - deletes the contents of the destination
directory before copying the files.
/S - includes all sub-directories to the directory
which contains the source files that are being
copied. Empty sub-directories are not copied.
/T - moves files from the source directory to the
destination directory. The files are deleted from the
source directory after they are copied.
/V - turns ON verification of disk writes when
copying files. This ensures that the copied files can
be read from the disk again.
/W - prompts you to press a key before starting to
copy.
/Z - copies files from several diskettes. XCOPY will
prompt you to insert a new diskette when all files
have been copied from the current diskette.
Remarks: The source filespec (including drive and path) is
listed before the destination filespec (including
drive and path). The filespec can consist of any
legal filename including the wildcards `?' and `*'.
XCOPY will assume you want to keep the original
filename(s) if no filespec is specified for the
destination of the copied files.
Switches
XCOPY gives you a range of possibilities concerning which files
to copy and the way these files are copied. There are (15)
fifteen different switches to choose from. Since the individual
often has a standard way of copying files, XCOPY can use the SET
command of X-DOS to recognize one or more switches which are to
be used every time XCOPY is invoked. The format of SET is as
follows:
SET XCOPY=/switch1/switch2/(...)
Following is an in-depth description on all of the available
6-94
XCOPY switches:
A - By specifying this switch you tell XCOPY to copy only the
files, satisfying the source filespec, which have the Archive bit
attribute set. If you are using the XCOPY command for backing up
files, you can use this switch to ensure that you are only
copying the files that have changed since the last time you made
a backup. To use XCOPY properly for backup purposes you will have
to use the /M switch.
C - The /C switch makes XCOPY display a list of all files that
match the source filespec and lets you select which files to
copy. Use the [Up] and [Down] arrow keys to scroll back and forth
in the list. Highlight a file and press [ENTER] to select that
file. If the contents of the displayed directory can not fit in
the window, you can use the [Down] arrow key to access the rest
of the files. If you make a wrong file selection you can use the
[ENTER] key to delete the file from the list. When you have
selected all the files you want to copy, you can press the [F5]
function key to begin copying the selected files to the
destination directory.
D - This switch tells XCOPY to delete any existing files in the
destination directory before copying the files from the source
directory to the destination directory. You will be prompted for
a confirmation before XCOPY goes ahead and delete the files.
XCOPY will not delete any files in the destination directory
which have the Read-Only, System, and/or Hidden attributes set.
H - If you run the XCOPY command with the /H switch, XCOPY
displays a help screen, describing the command line syntax and
explaining the available switches. This help screen will also be
displayed if you use XCOPY with wrong parameters.
I - Use the /I switch to include hidden files which match the
source filespec in the selection of files being copied.
M - With the /M switch you have an easy way of backing up files.
This switch makes XCOPY copy only files with the Archive
attribute set and after the files have been copied, the Archive
attribute of the file is reset. This way, XCOPY can keep track of
which file has been previously backed up so that it only copies
files that have been modified.
N - With this option enabled, XCOPY will only copy the files
which are new to the destination directory. A file is new if it
does not exist in the destination directory or if the time and
date stamp on an existing, matching filename is prior to that of
the source file.
P - This switch makes XCOPY display a message on the screen for
each file and you will have to acknowledge the copying of the
6-95
file.
S - with the /S switch enabled, XCOPY will copy all the files and
sub-directories from the source directory to the destination
directory. If the source sub-directories do not exist in the
destination directory, XCOPY will automatically create them.
T - With the /T switch you have an easy way to move files from
one directory to another directory. With this switch set, XCOPY
first copies the files, matching the source filespec, to the
destination directory. Then it deletes the source files, matching
the source filespec, in the source directory. Hence, the files
will seem to have been moved from one location to another
location in one step even though XCOPY performs the moving in two
steps.
V - Use the /V switch to copy files from several diskettes to
another destination, such as a directory on a hard disk. XCOPY
will automatically prompt you to change diskettes when it has
copied all of the files, matching the source filespec, from the
current diskette to the destination. When you have copied files
from the last diskette and XCOPY prompts you to insert a new
diskette, you can press the [Esc] key to terminate the XCOPY
command.
Copying to a device
You can copy to devices as well as to files, so XCOPY filespec
COM1 [Enter] sends the contents of the specified file(s) to the
COM1 port.
XCOPY filespec PRN will print it on the parallel printer attached
to the LPT1 printer port. XCOPY can copy to the following
devices: PRN, LPT1, LPT2, LPT3, COM1, COM2, COM3, COM4 and AUX.
Examples: You can copy all files matching the *.TXT filespec from
the default directory to the C:\BUSINESS\LETTERS
directory by typing:
XCOPY *.TXT C:\BUSINESS\LETTERS
6-96